package com.cuixichang.minimalism.basal.enums;

public enum ResponseCoderEnum {
    Success("200","请求操作执行完成"), Failed("400","请求信息异常,请联系管理员"),
    NoLoginName("40001","请输入账号名称"),NoCode("40002","请输入验证码"),
    // 认证相关
    SystemUnFind("401","请求头{0}信息缺失,请检查"), SystemUnMatched("401","系统编码不匹配"),
    AccessDenied("401","访问被拒绝"), AccountExpired("401","账号已过期,请重新登录"),
    BadCredential("401","错误认证信息"), UsernameNotFound("400","查询账号或密码异常,请检查"),
    UserLocked("400100","账号已被锁定"),
    // 业务相关
    NotValidException(ResponseCoderEnum.Failed.getCode(), "参数校验不通过"),
    CheckException(ResponseCoderEnum.Failed.getCode(),"数据检查存在异常"),
    NoDataException(ResponseCoderEnum.Failed.getCode(),"数据不存在"),
    ServiceException(ResponseCoderEnum.Failed.getCode(),"业务异常"),
    MethodNotSupportedException(ResponseCoderEnum.Failed.getCode(),"请求方式错误")
    ;
    ResponseCoderEnum(String code,String desc) {
        this.desc = desc;
        this.code = code;
    }
    private String desc;
    private String code;

    public String getDesc() {
        return desc;
    }

    public String getCode() {
        return code;
    }
}
